package com.godlei.security.service;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

/**
 * @ClassName IUserDetailService
 * @Description 用户表业务层接口
 * @Author 高达磊
 * @Date 2021/12/22-14:13
 * @Version 1.0
 */
public interface IUserDetailService extends UserDetailsService {

    /**
     * 通过用户名查询用户信息
     * @param username 用户名
     * @return 用户信息（包含角色信息）
     * @throws UsernameNotFoundException
     */
    @Override
    UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;
}
